window.onload = function() {
	var config = {
		id: "tg1",
		width: "800",
		renderTo: "div1",
		headerAlign: "left",
		headerHeight: "30",
		dataAlign: "left",
		indentation: "20",
		folderOpenIcon: "../images/f01.png",
		folderCloseIcon: "../images/f02.png",
		defaultLeafIcon: "../images/f03.png",
		hoverRowBackground: "true",
		folderColumnIndex: "1",
		itemClick: "itemClickEvent",
		columns: [{
			headerText: "",
			headerAlign: "center",
			dataAlign: "center",
			width: "20"
		}, {
			headerText: "功能名称",
			dataField: "name",
			headerAlign: "center",
			handler: "customOrgName"
		}, {
			headerText: "功能编码",
			dataField: "code",
			width: "100"
		}, {
			headerText: "功能图标",
			dataField: "icon",
			width: "100"
		}, {
			headerText: "展示模板",
			dataField: "tmpl",
			width: "100"
		}, {
			headerText: "详情模板",
			dataField: "detail_tmpl",
			width: "100"
		}, {
			headerText: "操作",
			width: "100",
			handler: "customLook"
		}],
		data: [{
			name: "渝州区街道",
			icon: "../images/f01.png",
			code: "YZQ",
			tmpl: "分类模板01",
			children: [{
				name: "政务",
				code: "zw",
				icon: "../images/f01.png",
				tmpl: "分类模板1-1",
				children : [{
					name: "阳光党建",
					code: "dj",
					icon: "../images/f01.png",
					tmpl: "分类模板1-1",
					detail_tmpl: "详情模板1-1",
					children: [{
						name: "组织活动",
						code: "zzhd",
						icon: "../images/f01.png",
						tmpl: "分类模板1-1",
						detail_tmpl: "详情模板1-1"
					},{
						name: "掌上党校",
						code: "zzhd",
						icon: "../images/f01.png",
						tmpl: "分类模板1-1",
						detail_tmpl: "详情模板1-1",
						children: [{
							name: "党校课程",
							code: "dxkc",
							icon: "../images/f01.png",
							tmpl: "分类模板1-1-1",
							detail_tmpl: "详情模板1-1-1",
						}, {
							name: "党校类型",
							code: "dxlx",
							icon: "../images/f01.png",
							tmpl: "分类模板1-1-1",
							detail_tmpl: "详情模板1-1-1",
						}]
					},{
						name: "组织建设",
						code: "zzhd",
						icon: "../images/f01.png",
						tmpl: "分类模板1-1",
						detail_tmpl: "详情模板1-1"
					},{
						name: "学习19大",
						code: "zzhd",
						icon: "../images/f01.png",
						tmpl: "分类模板1-1",
						detail_tmpl: "详情模板1-1"
					},{
						name: "书记信箱",
						code: "zzhd",
						icon: "../images/f01.png",
						tmpl: "分类模板1-1",
						detail_tmpl: "详情模板1-1"
					},{
						name: "通知公示",
						code: "zzhd",
						icon: "../images/f01.png",
						tmpl: "分类模板1-2",
						detail_tmpl: "详情模板1-2"
					},{
						name: "群工平台",
						code: "zzhd",
						icon: "../images/f01.png",
						tmpl: "分类模板1-3",
						detail_tmpl: "详情模板1-3"
					},{
						name: "组织概况",
						code: "zzhd",
						icon: "../images/f01.png",
						tmpl: "分类模板1-4",
						detail_tmpl: "详情模板1-4"
					}]
				}, {
					name: "党员管理",
					code: "dygl",
					icon: "../images/f01.png",
					tmpl: "分类模板1-1",
					children: [{
						name: "入党申请",
						code: "rdsq",
						icon: "../images/f01.png",
						tmpl: "分类模板1-1",
						detail_tmpl: "详情模板1-1"
					},{
						name: "流动党员管理",
						code: "zzhd",
						icon: "../images/f01.png",
						tmpl: "分类模板1-1",
						detail_tmpl: "详情模板1-1"
					},{
						name: "党组织转接",
						code: "zzhd",
						icon: "../images/f01.png",
						tmpl: "分类模板1-1",
						detail_tmpl: "详情模板1-1"
					},{
						name: "党员活动",
						code: "zzhd",
						icon: "../images/f01.png",
						tmpl: "分类模板1-1",
						detail_tmpl: "详情模板1-1"
					},{
						name: "党员风采",
						code: "zzhd",
						icon: "../images/f01.png",
						tmpl: "分类模板1-1",
						detail_tmpl: "详情模板1-1"
					}]
				}]
			}, {
				name: "群团",
				children: [{
					name: "人大政协",
					code: "dygl",
					icon: "../images/f01.png",
					tmpl: "分类模板1-1",
					children: [{
						name: "人大政协",
						code: "rdsq",
						icon: "../images/f01.png",
						tmpl: "分类模板1-1",
						detail_tmpl: "详情模板1-1"
					},{
						name: "反映问题",
						code: "zzhd",
						icon: "../images/f01.png",
						tmpl: "分类模板1-1",
						detail_tmpl: "详情模板1-1"
					}]
				}, {
					name: "群团服务",
					code: "dygl",
					icon: "../images/f01.png",
					tmpl: "分类模板1-1",
					children: [{
						name: "群团活动",
						code: "rdsq",
						icon: "../images/f01.png",
						tmpl: "分类模板1-1",
						detail_tmpl: "详情模板1-1"
					},{
						name: "特色活动",
						code: "zzhd",
						icon: "../images/f01.png",
						tmpl: "分类模板1-1",
						detail_tmpl: "详情模板1-1"
					},{
						name: "群团服务",
						code: "zzhd",
						icon: "../images/f01.png",
						tmpl: "分类模板1-1",
						detail_tmpl: "详情模板1-1"
					},{
						name: "协会成员",
						code: "zzhd",
						icon: "../images/f01.png",
						tmpl: "分类模板1-1",
						detail_tmpl: "详情模板1-1"
					}]
				}]
			}, {
				name: "廉政建设",
				code: "lzjs",
				icon: "../images/f01.png",
				tmpl: "分类模板1-1",
				detail_tmpl: "详情模板1-1"
			}, {
				name: "统一战线",
				code: "lzjs",
				icon: "../images/f01.png",
				tmpl: "分类模板1-1",
				detail_tmpl: "详情模板1-1"
			}, {
				name: "宣传思想",
				code: "lzjs",
				icon: "../images/f01.png",
				tmpl: "分类模板1-1",
				children: [{
					name: "理论武装",
					code: "lzjs",
					icon: "../images/f01.png",
					tmpl: "分类模板1-1",
					detail_tmpl: "详情模板1-1"
				}, {
					name: "精神文明",
					code: "lzjs",
					icon: "../images/f01.png",
					tmpl: "分类模板1-1",
					detail_tmpl: "详情模板1-1"
				}, {
					name: "特色活动",
					code: "lzjs",
					icon: "../images/f01.png",
					tmpl: "分类模板1-1",
					detail_tmpl: "详情模板1-1"
				}]
			}]
		}]
	};
	var treeGrid = new TreeGrid(config);
	treeGrid.show()
}